import React, { Component } from 'react';
import { Tag } from 'antd';

export default class TagList extends Component{
    constructor(props) {
        super(props);
    }

    render(){
        const {dataList,handleTagClose} = this.props;
        return (
          <div>
            {dataList.map(record => {
          return (
            <Tag key={record.key} closable={record.closable} afterClose={() => handleTagClose(record.key)}>
              {record.name}
            </Tag>
)
        })}
          </div>
)
    }
}